package com.yc.api;

import com.yc.api.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @ClassName ResfoodApi
 * @since: 2023/8/23 19:46
 * @auth: kirito
 * @description:
 **/
@FeignClient(value = "cloud-food", path = "resfood", configuration = FeignConfig.class)
public interface ResfoodApi {
    //    @RequestLine("GET /findByPage")
    @RequestMapping(value = "findByPage", method = {RequestMethod.GET})
    public Map<String, Object> findByPage(
            @RequestParam int pageno,
            @RequestParam int pagesize,
            @RequestParam String sortby,
            @RequestParam String sort
    );

    //openFeign支持springMVC注解解析
    @GetMapping("findById/{fid}")
    public Map<String, Object> findById(@PathVariable Integer fid);

    @GetMapping("findAll")
    public Map<String, Object> findAll();
}

